<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>客户详细信息</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script src="${ctx}/rs/js/jquery.validate.min.js"></script>
<script src="${ctx}/rs/js/jquery.form.js" type="text/javascript"></script>
</head>
<body>
<form id="form1" class="form-horizontal"  enctype="multipart/form-data">
     
      <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">广告类型</label>
        <div class="col-sm-6 wid2">
          <input type="text" class="form-control " id="emailurl" name="emailurl" value="${user.ad_type}"/>
        </div>
      </div>
      
       <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">投放媒体</label>
        <div class="col-sm-6 wid2">
          <input type="text" class="form-control " id="showValue" name="showValue" value="${user.resouce_name}"/>
        </div>
      </div>
     
      <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">广告名称</label>
        <div class="col-sm-6 wid2">
             <input type="hidden" id="id" name="id" value="${user.id}"/>
             <input type="text" class="form-control " id="username" name="username" value="${user.ad_name}"/>
        </div>
      </div>
      
       <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">广告招投期</label>
            <c:if test="${bid_starttim ==null}">
	            <div class="col-sm-6 wid2" style="padding-top: 7px;">
	                                                不限
	            </div>
            </c:if>
            <c:if test="${ bid_starttim !=null}">
		        <div class="col-sm-6 wid2">
		          <input type="text" class="form-control " id="bid_starttime" name="industry" value="${bid_starttim}"/>
		                                  至
		          <input type="text" class="form-control " id="bid_endtime" name="industry" value="${bid_endtim}"/>
		        </div>
            </c:if>
      </div>
      
       <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">广告投放期</label>
             <c:if test="${put_starttim ==null}">
                <div class="col-sm-6 wid2" style="padding-top: 7px;">
                                                    不限
                </div>
            </c:if>
            <c:if test="${ put_starttim !=null}">
		        <div class="col-sm-6 wid2">
		          <input type="text" class="form-control " id="put_starttime" name="describe" value="${put_starttim}"/>
		                          至
		          <input type="text" class="form-control " id="put_endtime" name="describe" value="${put_endtim}"/>
		        </div>
           </c:if>
      </div>
       <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">低价</label>
        <div class="col-sm-6 wid2">
          <input type="text" class="form-control " id="describe" name="describe" value="${user.base_price}"/>
        </div>
      </div>
     
      
       <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">覆盖区域</label>
        <div class="col-sm-6 wid2">
          <input type="text" class="form-control " id="describe" name="describe" value="${user.area_name}"/>
        </div>
      </div>
       <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">面向人群</label>
        <div class="col-sm-6 wid2">
          <input type="text" class="form-control " id="describe" name="describe" value="${user.put_crowd}"/>
        </div>
      </div>
       <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">拒投行业</label>
        <div class="col-sm-6 wid2">
          <input type="text" class="form-control " id="describe" name="describe" value="${user.reject_industry}"/>
        </div>
      </div>
       
       <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">摘要</label>
        <div class="col-sm-6 wid2">
          <input type="text" class="form-control " id="describe" name="describe" value="${user.abstract_content}"/>
        </div>
      </div>
       <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">舞台冠名赞助权益</label>
        <div class="col-sm-6 wid2">
          <input type="text" class="form-control " id="describe" name="describe" value="${user.title}"/>
        </div>
      </div>
       <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">广告素材说明</label>
        <div class="col-sm-6 wid2">
          <input type="text" class="form-control " id="describe" name="describe" value="${user.content}"/>
        </div>
      </div>
      
    
      
      <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">banner图</label>
        
         <c:if test="${user.banner_url == '' || user.banner_url == null}">
            <div class="col-sm-6 wid2" style="padding-top: 7px;">
                                                  无图片
            </div>
        </c:if>
        <c:if test="${user.banner_url != '' && user.banner_url != null}">
         <div class="col-sm-6 wid2" id="imgdiv">
            <img id="banimg" class="banimg"  width="100" height="100" src="${user.banner_url}"/>
            <input type="button" value="查看大图" style="vertical-align: bottom;" onclick="divshow(banimg)"/>
         </div>
        </c:if>
      </div>
      
      <div id="showdiv"  style="display:none;position: absolute;z-index: 1000;top: 50%;left: 50%;width: 520px;height: 400px;margin: -200px 0 0 -260px;">
        <div id="picmain">
            <div id="logpic"><span style= "cursor:hand;"  onclick="nonediv()">&nbsp;&nbsp;&nbsp;&nbsp;<font color="#FF0000">[关闭窗口]</font></span></div>
            <div id="pics"><img id="myimage" src=""   width="520px" height="400px" style="border-width:1px; border-color:#006633; border-style:solid;" ></div>
        </div>
    </div>
</form>


<script type="text/javascript" src="${ctx}/rs/js/bootstrapQ.min.js"></script>
<script src="${ctx}/rs/js/messages_zh.min.js"></script>

<script>


function divshow(obj){
         document.getElementById("myimage").src=obj.src; 
         var divpic = document.getElementById("showdiv");
         var ch = $("#showdiv").height();
            var cw = $("#showdiv").width();
           var x =300;
            var y = 450;
            var l,t;
            if(x>cw/2){
                //靠近右边
                l = x-300;
            }else{
                l = x;
            }
            if(y>ch/2){
                //靠近下边
                t = y-200;
            }else{
                t = y;
            }
           divpic.style.display="block";
          
}
function nonediv(){
         var divpic = document.getElementById("showdiv");
           divpic.style.display="none";
}
</script>
</body>
</html>